Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Conversation

Faraz32123
Copy link

Backport PR to to redwood.master.
Reference PR

Muhammad Faraz Maqsood and others added 4 commits May 16, 2024 13:19
Creating this PR to Sync ecommerce-worker celery related settings with LMS and CMS.
Celery settings in ecommerce worker is causing below error in cms-worker.
This error can be reproduced by
1. creating some unpublished content in CMS's course outline section
2. disable the ecommerce plugin and then run tutor local start -d
3. enable the ecommerce plugin and then run tutor local start -d
4. Below error can be seen in cms-worker container's logs

2024-05-16 19:08:35 [2024-05-16 14:08:35,099: CRITICAL/MainProcess] Can't decode message body: ContentDisallowed('Refusing to deserialize untrusted content of type pickle (application/x-python-serialize)') [type:'application/x-python-serialize' encoding:'binary' headers:{'clock': 1, 'expires': 1715868516.096079}]
2024-05-16 19:08:35
2024-05-16 19:08:35 body: b'\x80\x04\x95\x0e\x01\x00\x00\x00\x00\x00\x00}\x94(\x8c\x06method\x94\x8c\x05hello\x94\x8c\targuments\x94}\x94(\x8c\tfrom_node\x94\x8c\x13celery@71b2eeb6ff70\x94\x8c\x07revoked\x94}\x94u\x8c\x0bdestination\x94N\x8c\x07pattern\x94N\x8c\x07matcher\x94N\x8c\x06ticket\x94\x8c$3ffc6757-02d4-4ef1-8926-4e3dff9ed7a6\x94\x8c\x08reply_to\x94}\x94(\x8c\x08exchange\x94\x8c\x13reply.celery.pidbox\x94\x8c\x0brouting_key\x94\x8c$9a4e6cd3-05c1-33bb-a9ba-66c444c4ee0a\x94uu.' (281b)
2024-05-16 19:08:35 Traceback (most recent call last):
2024-05-16 19:08:35   File "/openedx/venv/lib/python3.11/site-packages/kombu/messaging.py", line 650, in _receive_callback
2024-05-16 19:08:35     decoded = None if on_m else message.decode()
2024-05-16 19:08:35                                 ^^^^^^^^^^^^^^^^
2024-05-16 19:08:35   File "/openedx/venv/lib/python3.11/site-packages/kombu/message.py", line 201, in decode
2024-05-16 19:08:35     self._decoded_cache = self._decode()
2024-05-16 19:08:35                           ^^^^^^^^^^^^^^
2024-05-16 19:08:35   File "/openedx/venv/lib/python3.11/site-packages/kombu/message.py", line 205, in _decode
2024-05-16 19:08:35     return loads(self.body, self.content_type,
2024-05-16 19:08:35            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-16 19:08:35   File "/openedx/venv/lib/python3.11/site-packages/kombu/serialization.py", line 255, in loads
2024-05-16 19:08:35     raise self._for_untrusted_content(content_type, 'untrusted')
2024-05-16 19:08:35 kombu.exceptions.ContentDisallowed: Refusing to deserialize untrusted content of type pickle (application/x-python-serialize)
tox would enforce python3.8 without this change
Now we install tox in that specific python and then run tox from it
@Faraz32123 Faraz32123 requested a review from a team as a code owner May 31, 2024 08:06
Comment on lines +36 to +38
# Sync settings with LMS/CMS
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit is already merged to redwood.master. This could be happening due to fork being out of sync.

@Faraz32123
Copy link
Author

closing this PR in favour of this PR.

@Faraz32123 Faraz32123 closed this May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants